package com.ctech.wsgen.model;

import java.io.File;
import java.util.List;

public class Site {
	
	private String sql_queryManufactures;
	private String sql_queryItemCategories;
	private String str_siteDir;
	private String str_email;
	private String str_websiteUrl;
	private JavaScriptBlock javaScriptBlock;
	
	List<Manufacture> manufactures;	
	List<ItemCategory> itemCategories;
	
	public Site() { }
	
	public Site(List<Manufacture> manufactures,
			List<ItemCategory> itemCategories) {
		super();
		this.manufactures = manufactures;
		this.itemCategories = itemCategories;
	}
	
	public String getSql_queryManufactures() {
		return sql_queryManufactures;
	}
	public void setSql_queryManufactures(String sqlQueryManufactures) {
		sql_queryManufactures = sqlQueryManufactures;
	}
	public String getSql_queryItemCategories() {
		return sql_queryItemCategories;
	}
	public void setSql_queryItemCategories(String sqlQueryItemCategories) {
		sql_queryItemCategories = sqlQueryItemCategories;
	}
	public String getStr_siteDir() {
		return str_siteDir;
	}
	public void setStr_siteDir(String strSiteDir) {
		str_siteDir = strSiteDir;
	}

	public List<Manufacture> getManufactures() {
		return manufactures;
	}
	public void setManufactures(List<Manufacture> manufactures) {
		this.manufactures = manufactures;
	}
	public List<ItemCategory> getItemCategories() {
		return itemCategories;
	}
	public void setItemCategories(List<ItemCategory> itemCategories) {
		this.itemCategories = itemCategories;
	}

	public void setStr_email(String str_email) {
		this.str_email = str_email;
	}

	public String getStr_email() {
		return str_email;
	}
	
	public File getSiteDir() {
		if(this.str_siteDir != null) {
			File siteDir = new File(this.str_siteDir);
			if(!siteDir.exists()) siteDir.mkdir();	
			return siteDir;
		}		
		return null;
	}

	public void setStr_websiteUrl(String str_websiteUrl) {
		this.str_websiteUrl = str_websiteUrl;
	}

	public String getStr_websiteUrl() {
		return str_websiteUrl;
	}

	public void setJavaScriptBlock(JavaScriptBlock javaScriptBlock) {
		this.javaScriptBlock = javaScriptBlock;
	}

	public JavaScriptBlock getJavaScriptBlock() {
		return javaScriptBlock;
	}

}
